home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tabvie.zip / MAINVIEW.CPP < prev    next >
C/C++ Source or Header  |  1994-04-13  |  2KB  |  88 lines

  1. // ordview.cpp : implementation of the CMainView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "tab.h"
  6.  
  7. #include "tabdoc.h"
  8. #include "mainview.h"
  9. //
  10. //include children tab views here for each tab type
  11. //
  12. #include "drawview.h"
  13. #include "ordervw.h"
  14. #include "editvw.h"
  15.  
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char BASED_CODE THIS_FILE[] = __FILE__;
  19. #endif
  20.  
  21. #define BASE     CTabView
  22. #define THIS    CMainView
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CMainView
  25.  
  26. IMPLEMENT_DYNCREATE(CMainView, CTabView)
  27.  
  28. BEGIN_MESSAGE_MAP(CMainView, CTabView)
  29.     //{{AFX_MSG_MAP(CMainView)
  30.     //}}AFX_MSG_MAP
  31.     // Standard printing commands
  32. END_MESSAGE_MAP()
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CMainView construction/destruction
  36.  
  37. THIS::THIS()
  38. {
  39.     // TODO: add construction code here
  40. }
  41.  
  42. THIS::~THIS()
  43. {
  44. }
  45.  
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CMainView diagnostics
  49.  
  50. #ifdef _DEBUG
  51. void THIS::AssertValid() const
  52. {
  53.     BASE::AssertValid();
  54. }
  55.  
  56. void THIS::Dump(CDumpContext& dc) const
  57. {
  58.     CView::Dump(dc);
  59. }
  60.  
  61. CTabDoc* THIS::GetDocument() // non-debug version is inline
  62. {
  63.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTabDoc)));
  64.     return (CTabDoc*) m_pDocument;
  65. }
  66.  
  67. #endif //_DEBUG
  68. void THIS::OnInitialUpdate()
  69. {
  70.     COrderView* pOrderView = (COrderView*) addTabView(RUNTIME_CLASS(COrderView),GetDocument(),
  71.         "&Options");
  72.     ASSERT(pOrderView != NULL);
  73.     pOrderView->m_pTabView = this;
  74.  
  75.     CDrawView* pDrawView = (CDrawView*) addTabView(RUNTIME_CLASS(CDrawView),GetDocument(),
  76.         "&Graphics",TRUE,FALSE);
  77.     ASSERT(pDrawView != NULL);
  78.     pDrawView->m_pTabView = this;
  79.  
  80.     CEditVw* pEditView = (CEditVw*) addTabView(RUNTIME_CLASS(CEditVw),GetDocument(),
  81.         "&Edit",TRUE,FALSE);
  82.     ASSERT(pEditView != NULL);
  83.     pEditView->m_pTabView = this;
  84.  
  85.     BASE::OnInitialUpdate();
  86. }
  87.  
  88.